#ifndef WXSBOOLPROPERTY_H
#define WXSBOOLPROPERTY_H

#include "wxsproperty.h"


class wxsBoolProperty: public wxsProperty {
  public:


    wxsBoolProperty( const wxString& PGName, const wxString& DataName, long Offset, bool Default = 0, int Priority = 100 );


    virtual const wxString GetTypeName() { return _T( "bool" ); }

  protected:

    virtual void PGCreate( wxsPropertyContainer* Object, wxPropertyGridManager* Grid, wxPGId Parent );
    virtual bool PGRead( wxsPropertyContainer* Object, wxPropertyGridManager* Grid, wxPGId Id, long Index );
    virtual bool PGWrite( wxsPropertyContainer* Object, wxPropertyGridManager* Grid, wxPGId Id, long Index );
    virtual bool XmlRead( wxsPropertyContainer* Object, TiXmlElement* Element );
    virtual bool XmlWrite( wxsPropertyContainer* Object, TiXmlElement* Element );
    virtual bool PropStreamRead( wxsPropertyContainer* Object, wxsPropertyStream* Stream );
    virtual bool PropStreamWrite( wxsPropertyContainer* Object, wxsPropertyStream* Stream );

  private:
    long Offset;
    bool Default;
};




#define WXS_BOOL(ClassName,VarName,PGName,DataName,Default) \
  { static wxsBoolProperty _Property(PGName,DataName,wxsOFFSET(ClassName,VarName),Default); \
    Property(_Property); }


#define WXS_BOOL_P(ClassName,VarName,PGName,DataName,Default,Priority) \
  { static wxsBoolProperty _Property(PGName,DataName,wxsOFFSET(ClassName,VarName),Default,Priority); \
    Property(_Property); }



#endif
